<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function () {
    return view('welcome');
});
//sso设置cookie地址
Route::any('/sso-v1/setcookies',function(Illuminate\Http\Request $request){
    $param = $request->input();
    return redirect('ssosetcookies?ppinf='.base64_encode($param['ppinf']).'&ppdig='.base64_encode($param['ppdig']));
});
//sso登陆成功地址
Route::any('/sso-v1/success',function(Illuminate\Http\Request $request){
    $param = $request->input();
    return redirect('ssosuccess?appId='.$param['appId']);
});
//sso设置cookie地址
Route::any('/sso-v1/clearcookies',function(Illuminate\Http\Request $request){
    return redirect('ssoclearcookies');
});

Route::any('ssosetcookies', 'Auth\SsoController@setcookies');
Route::any('ssosuccess', 'Auth\SsoController@success');
Route::any('/sso/logout', 'Auth\SsoController@logout');
Route::any('ssoclearcookies', 'Auth\SsoController@clearcookies');